

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1">    #parse("/h5/common/webWords.html")<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="format-detection" content="telephone=no, email=no" />
    <link rel="stylesheet" type="text/css" href="http://${staticHost}/css/default.css" />
    <script type="text/javascript" src="http://${staticHost}/js/continuingEducation.js"></script>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
    <script src="http://${staticHost}/js/layer.js"></script>

    <script type="text/javascript">
        function showMessage(msg){
            layer.open({
                content: msg
                ,btn: '关闭'
            });
        }
        $(document).ready(function () {
            $("#submitHeader").click(function () {
                var lujing = $("#lujing").val();
                $.ajax({
                    type:'post',
                    url:'${requestHost}/edu/auth/modifyStudentInfo',
                    contentType:'application/x-www-form-urlencoded; charset=utf-8',
                    data:{
                        lujing:lujing
                    },
                    success: function (result) {
                        if(result.status == '00000000'){
                            showMessage("修改头像成功");
                            var callBackUrl = document.referrer;
                            window.location.href = callBackUrl;
                        }else if(result.status == '200000002'){
                            $("#phoneNumberDiv").text(result.message);
                        } else{
                            showMessage(result.message);
                        }

                    }
                });
            });


        });

    </script>
    <style>
        #clipArea {
            margin: 20px;
            height: 300px;
        }
        #file,
        #clipBtn {
            margin: 20px;
        }
        #view {
            margin: 0 auto;
            width: 200px;
            height: 200px;margin-top:100px;
        }
    </style>
</head>
<body>
<!--<form name="form1" method="post" action="xpic.aspx" id="form1">-->
    <div>
        <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTExNjA1MTM3MDdkGAEFHl9fQ29udHJvbHNSZXF1aXJlUG9zdEJhY2tLZXlfXxYBBQZ0aWppYW8DnQTgM2Xc6ztqhe8tKX3BHsxJpQ==" />
    </div>
    <div>
        <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="01AA9347" />
        <input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKUzuk0AqnymfQFV6NnD4Udvke0MDOrNoxkPizglac=" />
    </div>
    <div class="dlny clear">
        修改我的头像
    </div>
    <article class="zzsc-container">
        <div id="clipArea"></div>
        <dd class="file">选择文件
            <input type="file" id="file" >
        </dd>

        <a id="clipBtn" style="width:100px; height:30px; border:none; margin-bottom:10px; display:block; float:left;" ><img src="http://${staticHost}/images/jiequ.png" ></a>
        <div id="view"></div>
        <input id="lujing" name="lujing" type="text" style="display:none;" />
        <div class="md_dl"><input type="image" id="submitHeader" name="tijiao" id="tijiao" src="http://${staticHost}/images/sc.png" style="border-width:0px;width:155px; height:38px; border:none; margin-top:20px; margin-bottom:10px;" /></div>
    </article>
    <script src="http://${staticHost}/js/jquery-2.1.1.min.js"></script>
    <script src="http://${staticHost}/js/iscroll-zoom.js"></script>
    <script src="http://${staticHost}/js/hammer.js"></script>
    <script src="http://${staticHost}/js/jquery.photoClip.js"></script>
    <script>
        //document.addEventListener('touchmove', function (e) { e.preventDefault(); }, false);
        $("#clipArea").photoClip({
            width: 200,
            height: 200,
            file: "#file",
            view: "#view",
            ok: "#clipBtn",
            loadStart: function() {
                console.log("照片读取中");
            },
            loadComplete: function() {
                console.log("照片读取完成");
            },
            clipFinish: function(dataURL) {
                console.log(dataURL);
                document.getElementById("lujing").value=dataURL;
            }
        });
    </script>
    <div class="holderdiv"></div>
    <div class="fixdiv">
        <p><a href="javascript:void(0)" onclick="window.history.go(-1)"><img src="http://${staticHost}/images/foticon001.jpg"><span>返回</span></a></p>
        <p><a href="/edu/auth/modifyPwd"><img src="http://${staticHost}/images/foticon004.jpg"><span>重置密码</span></a></p>
        <p><a href="javascript:void(0)" onclick="loginOut()"><img src="http://${staticHost}/images/foticon003.jpg"><span>退出系统</span></a></p>
    </div>
<!--</form>-->
</body>
</html>